const port = "http://192.168.22.40:8082/"



//登录

async function PostAjaxLogin(url, data) {
    return new Promise((resolve, reject) => {
        $.ajax({
            url: port + url,
            method: "POST",
            async: true,
            contentType: "application/x-www-form-urlencoded",
            data: data,
            "success": res => {
                resolve(res)
            },
            "error": err => {
                reject(err)
            }
        })
    })
}
// ,
async function PostAjaxData(url, data) {
    let mAccountCode = EncodeStrXor("224ECEF8-D0B6-4232-951F-04E452175458")//GetAccountCode()
    return new Promise((resolve, reject) => {
        $.ajax({
            url: port + url,
            method: "POST",
            async: true,
            contentType: "application/x-www-form-urlencoded",
            headers: {
                "mAccountCode": mAccountCode,
            },
            data: data || "",
            "success": res => {
                resolve(res)
            },
            "error": err => {
                return reject(err)
            }
        })
    })
}

